package com.rp.android_gateway.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.rp.android_gateway.entity.Gateway;
import com.rp.android_gateway.mapper.GatewayMapper;
import com.rp.android_gateway.service.GatewayService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 网关 服务实现类
 * </p>
 *
 * @author vicente
 * @since 2021-11-09
 */
@Service
public class GatewayServiceImpl extends ServiceImpl<GatewayMapper, Gateway> implements GatewayService {

    @Override
    public boolean setStatus(String sn,Integer status) {
        UpdateWrapper<Gateway> wrapper = new UpdateWrapper<>();
        wrapper.eq("sn",sn).set("status",status);
        boolean update = this.update(wrapper);
        return update;
    }
}
